Ssl protocol error socket io |
您所在的位置:网站首页 › ssl_accept error › Ssl protocol error socket io |
I want to use SSL communication using socket.io. I am creating a server using socket.io with nodejs on the server side. I got an error in io.connect on the terminal. (Browser used chrome) index.js: 83 GET https: //*. *.co.jp: 5089/socket.io /? EIO = 3&transport = polling&t = N9FnIib net :: ERR_SSL_PROTOCOL_ERROR I am in trouble because I do not know the cause. It means «ERR_SSL_PROTOCOL_ERROR», but I don’t know how to investigate. If i know what this protocol refers to, please let me know What about SSLv, TLS version? ? Communication method wss or xhr-poolling? ? Failed to load resource: net :: ERR_SSL_PROTOCOL_ERROR : 5089/socket.io /? EIO = 3&transport = polling&t = N9OvC57: 1 : index.js: 83 GET https: //*. *.co.jp: 5089/socket.io /? EIO = 3&transport = polling&t = N9FnIib net :: ERR_SSL_PROTOCOL_ERROR Applicable source code var port = 5089; var fs = require ('fs'); var io = require ('socket.io'). listen (port, ( key: fs.readFileSync ('C: \ HTTPS \ XXX.pem'). toString (), cert: fs.readFileSync ('C: \ HTTPS \ XXX.cer'). toString (), ca: fs.readFileSync ('C: \ HTTPS \ XXX.txt'). toString (), 'log level': 1 }); console.log ('signaling server started on port:' + port); io.on ('connection', function (socket) { : :The script on the terminal side is let port = 5089; let socket = io.connect (‘wss: //*. *.co.jp: ‘+ port +’/’); Is like What I tried ・ When I was testing with the method of writing Websocket without using socket.io I confirmed that I can connect. (So I think the certificate is fine) ・ Next, I decided to write socket.io because I wanted to use the room function Got this error ・ I tried changing the connect on the terminal side to https, but it did not change. Addendum Below is the sample that I want to realize, so I tried it https://gist.github.com/kanreisa/1399446/d28a7e35df8860d4e6ab737b0f9fad77b0b482f3 At server startup io.enable (‘browser client minification’); At the order of TypeError: io.enable is not a function I got an error I made a comment and started the server, so I tested it The result is the same and it is «ERR_SSL_PROTOCOL_ERROR». (I’m not sure if io.enable is involved.) Supplemental information (FW/tool version, etc.) Please provide more detailed information here. |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |